Goto

Collaborating Authors

 fine-tuning pretrained nlp model


Fine-tuning pretrained NLP models with Huggingface's Trainer

#artificialintelligence

In the code above, the data used is a IMDB movie sentiments dataset. The data allows us to train a model to detect the sentiment of the movie review- 1 being positive while 0 being negative. This is a NLP task of sequence classification, as we want to classify each review(sequence of text) into positive or negative. There are many pretrained models which we can use to train our sentiment analysis model, let us use pretrained BERT as an example. There are many variants of pretrained BERT model, bert-base-uncased is just one of the variants.